<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box{width: 400px;height: 300px;border: solid 1px black;}
        .box ul{margin: 0;padding: 0;list-style: none;display: flex;background: #ccc}
        .box ul li{flex: 1;border: solid 1px black;text-align: center;line-height: 40px;}
        .box ul li.active{background: red;color: #fff}
        .cont p{margin: 0;height: 260px;display: none}
        .cont p:nth-child(1){background: #3aa;display: block}
        .cont p:nth-child(2){background: #3a3}
        .cont p:nth-child(3){background: #33a}
        .cont p:nth-child(4){background: #aa3}
    </style>
</head>
<body>
    <div class="box">
        <ul class="list"><li class="active">1</li><li>2</li><li>3</li><li>4</li></ul>
        <div class="cont">
            <p>手机</p>
            <p>电脑</p>
            <p>零食</p>
            <p>服装</p>
        </div>
    </div>
</body>
<script src="./js/main-table.js" type="module"></script>
</html>